package com.czg.designmode.prototype;

/**
 * 原型模式（克隆模式）测试类
 *
 * @author chenzhigang
 */
public class CloneTest {

    public static void main(String[] args) {
        CloneManager manager = new CloneManager();
        Shape circleShape = manager.getShape("circle");
        System.out.println("圆形的面积：" + circleShape.countArea());;
        Shape rectangleShape = manager.getShape("rectangle");
        System.out.println("长方形的面积：" + rectangleShape.countArea());
        Shape squareShape = manager.getShape("square");
        System.out.println("正方形的面积：" + squareShape.countArea());
    }

}
